/*
  (*) 2006-2013 Michael Ferguson <michaelferguson@acm.org>

    * This is a work of the United States Government and is not protected by
      copyright in the United States.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  femto/src/main/compile_regexp.h
*/
#ifndef _COMPILE_REGEXP_H_
#define _COMPILE_REGEXP_H_

#include "ast.h"
#include "nfa.h"
#include "error.h"

error_t compile_regexp_thompson(thompson_nfa_description_t* nfa, struct ast_node* ast);

error_t compile_regexp_from_string(nfa_description_t* nfa, char* regexp);
error_t compile_regexp_from_string_thompson(thompson_nfa_description_t* nfa, char* regexp);

error_t convert_thompson_nfa(nfa_description_t* nfa, thompson_nfa_description_t* tnfa);
error_t remove_epsilon(nfa_description_t* in, nfa_description_t* out);

error_t compile_regexp_from_ast(nfa_description_t* nfa, struct ast_node* ast);


#endif
